<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Calico: AprilTags::Edge Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Calico
   </div>
   <div id="projectbrief">A visual-inertial calibration library designed for rapid problem construction and debugging.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceAprilTags.html">AprilTags</a></li><li class="navelem"><a class="el" href="classAprilTags_1_1Edge.html">Edge</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="classAprilTags_1_1Edge-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">AprilTags::Edge Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Represents an edge between adjacent pixels in the image.  
 <a href="classAprilTags_1_1Edge.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="Edge_8h_source.html">Edge.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a274da8c779613f624ec8ee857dc0ba7d"><td class="memItemLeft" align="right" valign="top"><a id="a274da8c779613f624ec8ee857dc0ba7d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAprilTags_1_1Edge.html#a274da8c779613f624ec8ee857dc0ba7d">Edge</a> ()</td></tr>
<tr class="memdesc:a274da8c779613f624ec8ee857dc0ba7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a274da8c779613f624ec8ee857dc0ba7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa33f1331d7680ef3cd539dece9f4f500"><td class="memItemLeft" align="right" valign="top"><a id="aa33f1331d7680ef3cd539dece9f4f500"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAprilTags_1_1Edge.html#aa33f1331d7680ef3cd539dece9f4f500">operator&lt;</a> (const <a class="el" href="classAprilTags_1_1Edge.html">Edge</a> &amp;other) const</td></tr>
<tr class="memdesc:aa33f1331d7680ef3cd539dece9f4f500"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare edges based on cost. <br /></td></tr>
<tr class="separator:aa33f1331d7680ef3cd539dece9f4f500"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a8d32a6e3e60579f14caa4d2bd4a89e28"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAprilTags_1_1Edge.html#a8d32a6e3e60579f14caa4d2bd4a89e28">edgeCost</a> (float theta0, float theta1, float mag1)</td></tr>
<tr class="memdesc:a8d32a6e3e60579f14caa4d2bd4a89e28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cost of an edge between two adjacent pixels; -1 if no edge here.  <a href="classAprilTags_1_1Edge.html#a8d32a6e3e60579f14caa4d2bd4a89e28">More...</a><br /></td></tr>
<tr class="separator:a8d32a6e3e60579f14caa4d2bd4a89e28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9c140619c544ef691828686e137049c"><td class="memItemLeft" align="right" valign="top"><a id="ac9c140619c544ef691828686e137049c"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAprilTags_1_1Edge.html#ac9c140619c544ef691828686e137049c">calcEdges</a> (float theta0, int x, int y, const <a class="el" href="classAprilTags_1_1FloatImage.html">FloatImage</a> &amp;theta, const <a class="el" href="classAprilTags_1_1FloatImage.html">FloatImage</a> &amp;mag, std::vector&lt; <a class="el" href="classAprilTags_1_1Edge.html">Edge</a> &gt; &amp;edges, size_t &amp;nEdges)</td></tr>
<tr class="memdesc:ac9c140619c544ef691828686e137049c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates and inserts up to four edges into 'edges', a vector of Edges. <br /></td></tr>
<tr class="separator:ac9c140619c544ef691828686e137049c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a865ec1903f15bab40e3231e23c6d8845"><td class="memItemLeft" align="right" valign="top"><a id="a865ec1903f15bab40e3231e23c6d8845"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAprilTags_1_1Edge.html#a865ec1903f15bab40e3231e23c6d8845">mergeEdges</a> (std::vector&lt; <a class="el" href="classAprilTags_1_1Edge.html">Edge</a> &gt; &amp;edges, <a class="el" href="classAprilTags_1_1UnionFindSimple.html">UnionFindSimple</a> &amp;uf, float tmin[], float tmax[], float mmin[], float mmax[])</td></tr>
<tr class="memdesc:a865ec1903f15bab40e3231e23c6d8845"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process edges in order of increasing cost, merging clusters if we can do so without exceeding the thetaThresh. <br /></td></tr>
<tr class="separator:a865ec1903f15bab40e3231e23c6d8845"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ad8579fa6781801ad280c7d74e2379bfa"><td class="memItemLeft" align="right" valign="top"><a id="ad8579fa6781801ad280c7d74e2379bfa"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>pixelIdxA</b></td></tr>
<tr class="separator:ad8579fa6781801ad280c7d74e2379bfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acaa7293c86b7196e4dac5708ce7e27ae"><td class="memItemLeft" align="right" valign="top"><a id="acaa7293c86b7196e4dac5708ce7e27ae"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>pixelIdxB</b></td></tr>
<tr class="separator:acaa7293c86b7196e4dac5708ce7e27ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3300d3fb9c418c43456a255279f65ff"><td class="memItemLeft" align="right" valign="top"><a id="ab3300d3fb9c418c43456a255279f65ff"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>cost</b></td></tr>
<tr class="separator:ab3300d3fb9c418c43456a255279f65ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a279b972838aeefb8093b1eb01158a57c"><td class="memItemLeft" align="right" valign="top"><a id="a279b972838aeefb8093b1eb01158a57c"></a>
static float const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAprilTags_1_1Edge.html#a279b972838aeefb8093b1eb01158a57c">minMag</a> = 0.004f</td></tr>
<tr class="memdesc:a279b972838aeefb8093b1eb01158a57c"><td class="mdescLeft">&#160;</td><td class="mdescRight">minimum intensity gradient for an edge to be recognized <br /></td></tr>
<tr class="separator:a279b972838aeefb8093b1eb01158a57c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ac272dfcf04e12ecc3f90b80641bac4"><td class="memItemLeft" align="right" valign="top"><a id="a7ac272dfcf04e12ecc3f90b80641bac4"></a>
static float const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAprilTags_1_1Edge.html#a7ac272dfcf04e12ecc3f90b80641bac4">maxEdgeCost</a> = 30.f * float(M_PI) / 180.f</td></tr>
<tr class="memdesc:a7ac272dfcf04e12ecc3f90b80641bac4"><td class="mdescLeft">&#160;</td><td class="mdescRight">30 degrees = maximum acceptable difference in local orientations <br /></td></tr>
<tr class="separator:a7ac272dfcf04e12ecc3f90b80641bac4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3602e56e497c731821c98e995c0ea0f"><td class="memItemLeft" align="right" valign="top"><a id="aa3602e56e497c731821c98e995c0ea0f"></a>
static int const&#160;</td><td class="memItemRight" valign="bottom"><b>WEIGHT_SCALE</b> = 100</td></tr>
<tr class="separator:aa3602e56e497c731821c98e995c0ea0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7b3f90f934cbd9105b3cda63b0167ba"><td class="memItemLeft" align="right" valign="top"><a id="ad7b3f90f934cbd9105b3cda63b0167ba"></a>
static float const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAprilTags_1_1Edge.html#ad7b3f90f934cbd9105b3cda63b0167ba">thetaThresh</a> = 100</td></tr>
<tr class="memdesc:ad7b3f90f934cbd9105b3cda63b0167ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">theta threshold for merging edges <br /></td></tr>
<tr class="separator:ad7b3f90f934cbd9105b3cda63b0167ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36747ff004f7264c1eba593428bdc188"><td class="memItemLeft" align="right" valign="top"><a id="a36747ff004f7264c1eba593428bdc188"></a>
static float const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAprilTags_1_1Edge.html#a36747ff004f7264c1eba593428bdc188">magThresh</a> = 1200</td></tr>
<tr class="memdesc:a36747ff004f7264c1eba593428bdc188"><td class="mdescLeft">&#160;</td><td class="mdescRight">magnitude threshold for merging edges <br /></td></tr>
<tr class="separator:a36747ff004f7264c1eba593428bdc188"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents an edge between adjacent pixels in the image. </p>
<p>The edge is encoded by the indices of the two pixels. <a class="el" href="classAprilTags_1_1Edge.html" title="Represents an edge between adjacent pixels in the image.">Edge</a> cost is proportional to the difference in local orientations. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a8d32a6e3e60579f14caa4d2bd4a89e28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d32a6e3e60579f14caa4d2bd4a89e28">&#9670;&nbsp;</a></span>edgeCost()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int AprilTags::Edge::edgeCost </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>theta0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>theta1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>mag1</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Cost of an edge between two adjacent pixels; -1 if no edge here. </p>
<p>An edge exists between adjacent pixels if the magnitude of the intensity gradient at both pixels is above threshold. The edge cost is proportional to the difference in the local orientation at the two pixels. Lower cost is better. A cost of -1 means there is no edge here (intensity gradien fell below threshold). </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>calico/third_party/apriltags/apriltags/<a class="el" href="Edge_8h_source.html">Edge.h</a></li>
<li>calico/third_party/apriltags/src/Edge.cc</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
